In the related art, as a technique of speeding up access to data, a cache is known. For example, in an operating system (OS) of a computer, by storing part of data stored in a storage device such as a disk of slow access speed in a storage device such as a memory of fast access speed, access to the data is speeded up.
Generally, a storage device such as a memory of fast access speed has a small capacity and is used for other intended purposes than a cache, such as a program execution area and an OS management area. Therefore, the OS manages a memory area so as to allow leeway in some degree. For example, when an available memory remaining amount is below a predetermined value, the OS performs cache out processing to delete data stored in a cache area from the memory and restores the memory remaining amount.
As this cache out processing, LRU (Least Recently Used) and MRU (Most Recently Used) are known. The LRU is a method of deleting data that has not been used for a long time and the MRU is a method of deleting data that was recently used. In addition to these, there is a well-known method of giving priority to cached data in order of data to be remained by the user and deleing data in order from data of the lowest priority.
Also, in addition to control by the above OS, for example, there is a well-known method of setting an intermediate layer to perform cache control by an application between an application layer and cache control by an OS, and managing a cache by the application.
Patent Literature 1 Japanese Laid-open Patent Publication No. 7-182220
Patent Literature 2 Japanese Laid-open Patent Publication No. 11-96102
However, in the related art, since a fragmentation occurs in a cache area and the application execution speed is reduced, there is a problem that the processing performance degrades.
For example, in the related art, when data is deleted from a cache area, it is deleted in 4-kilobyte page units. Therefore, when one file is equal to or greater than 4 kilobytes, there is a case where the whole file does not remain on the cache area and only part of the file remains on the cache area. That is, fragmentation of the cache area occurs. In this state, when a given file is accessed, it is not possible to solve it in the cache area, and a disk is accessed to read partial data that is not present in the cache area. As a result, low-speed disk access occurs, the application execution speed becomes slow and degradation of the processing performance is caused.
Also, in a method of adding a new layer to a layered system in normal cache control, a processing layer is increased by one and therefore degradation of the speed to read data from a cache area is caused. For example, when an application reads data from a cache, cache control by a normal OS is requested to read the data via cache control by the application. After that, the date read by the cache control by the normal OS is acquired via the cache control by the application. Thus, since processing increases by an increase of a layer, the application execution speed becomes slow and, as a result, the processing performance degrades.